package com.fxp.project.jiuselu.web.models.message.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fxp.project.jiuselu.web.models.message.entity.JslMessageUse;
import com.fxp.project.jiuselu.web.models.message.mapper.JslMessageUseMapper;
import com.fxp.project.jiuselu.web.models.message.service.IJslMessageUseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JslMessageUseServiceImpl extends ServiceImpl<JslMessageUseMapper, JslMessageUse> implements IJslMessageUseService {

    @Autowired
    private JslMessageUseMapper jslMessageUseMapper;

    @Override
    public List<JslMessageUse> selectMessageUseByUserId(Long userId) {
        return jslMessageUseMapper.selectMessageUseByUserId(userId);
    }

    @Override
    public int insertJslMessageUse(JslMessageUse jslMessageUse) {
        return jslMessageUseMapper.insertMessageUse(jslMessageUse);
    }

    @Override
    public int updateJslMessageUse(JslMessageUse jslMessageUse) {
        return jslMessageUseMapper.updateMessageUse(jslMessageUse);
    }

    @Override
    public int updateJslMessageUseIsRead(Long userId) {
        return jslMessageUseMapper.updateMessageUseIsRead(userId);
    }
}
